<template>
	<view class="box">
		<!-- <view v-for="(v,i) in arr">
			<view class="header">
				<image class="img1" :src={{v.org_image}}></image>
				<view class="con">
					<text class="name">{{v.org_name}}</text>
					<text class="">{{v.org_people}} 人预约</text>
				</view>
			</view>
			<view class="">
				<view class="list1">
					<view class="greybox"></view>
					<text class="opentime">营业时间：周一至周六 7:30到10:30</text>
				</view>
				<view class="list1">
					<view class="greybox"></view>
					<text class="opentime">{{v.org_tel}}</text>
				</view>
				<view class="list1">
					<view class="greybox"></view>
					<text class="opentime">{{v.org_address}}</text>
				</view>
			</view>
		</view>
		
		<view class="midgap"></view>
		
		<view class="listtotal">
			<view v-for="(v,i) in arr1" @click="toproject" class="recommend">
				<view class="sale">sale</view>
				<image class="img2" :src={{v.com_image}}></image>
				<view>{{v.com_proName}}</view>
				<view>{{v.org_name}}</view>
				<view class="">
					<text>￥{{v.com_costPrice}}</text>
					<text class="midline">￥{{v.com_salesPrice}}</text>
				</view>
			</view>
			<!-- <view @click="toproject" class="recommend">
				<view class="sale">sale</view>
				<image class="img2" src="../../static/logo.png"></image>
				<view>老年人体检套餐（女）</view>
				<view>南方医科大学附属第三医院</view>
				<view class="">
					<text>￥998</text>
					<text class="midline">￥1200</text>
				</view>
			</view>
		</view> -->
		<!-- <view class="listtotal">
			<view @click="toproject" class="recommend">
				<view class="sale">sale</view>
				<image class="img2" src="../../static/logo.png"></image>
				<view>老年人体检套餐（女）</view>
				<view>南方医科大学附属第三医院</view>
				<view class="">
					<text>￥998</text>
					<text class="midline">￥1200</text>
				</view>
			</view>
			<view class="recommend">
				<view class="sale">sale</view>
				<image class="img2" src="../../static/logo.png"></image>
				<view>老年人体检套餐（女）</view>
				<view>南方医科大学附属第三医院</view>
				<view class="">
					<text>￥998</text>
					<text class="midline">￥1200</text>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr:[],
				arr1:[],
				id:''
			};
		},
		methods:{
			toproject(){
				uni.switchTab({
				    url: '/pages/Project/Project'
				});
			}
		},
		mounted(){
			this.$http({
				url:'/findByIdOrganization',
				data:{
					org_id:this.id
				}
			}).then((res)=>{
				console.log(res);
				this.arr=res.data;
			})
			
			this.$http({
				url:'/findAllSetmeal'
			}).then((res)=>{
				console.log(res);
				this.arr1=res.data;
			})
		},
		onLoad(options){
			console.log(options)
			this.id=options.id;
		}
	}
</script>

<style lang="less" scoped>
	.header{
		display: flex;
		margin-left: 20rpx;
		margin-right: 20rpx;
		justify-content: space-between;
		margin-top: 30rpx;
	}
	.img1{
		width: 250rpx;
		height: 200rpx;
		margin-right: 40rpx;
	}
	.name{
		display: block;
		font-size: 40rpx;
	}
	.con{
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.greybox{
		width: 50rpx;
		height: 50rpx;
		background: #eee;
	}
	.list1{
		display: flex;
		margin-left: 20rpx;
		margin-top: 40rpx;
		margin-right: 30rpx;
	}
	.opentime{
		margin-left: 30rpx;
	}
	.midgap{
		width: 100%;
		height: 30rpx;
		background: #eee;
		margin-top: 50rpx;
	}
	.img2{
		width: 300rpx;
		height: 300rpx;
	}
	.recommend{
		width: 300rpx;
		height: 500rpx;
		padding: 30rpx;
		background: #eee;
		border-radius: 30rpx;
		position: relative;
	}
	.midline{
		text-decoration: line-through;
		margin-left: 30rpx;
	}
	.listtotal{
		display: flex;
		justify-content: space-between;
		margin-top: 50rpx;
	}
	.sale{
		width: 100rpx;
		height: 50rpx;
		background: #fff;
		position: absolute;
		left: 50rpx;
		top: 50rpx;
	}
</style>
